// 患者管理模型
export interface PatientManagement {
  doctorId: string;
  patientIds: string[];
  recentPatients: string[]; // 最近查看的患者ID列表
  riskPatients: string[]; // 高风险患者ID列表
  lastUpdated: Date;
}

// 远程会诊模型
export interface Consultation {
  id: string;
  doctorId: string;
  patientId: string;
  type: 'online' | 'video' | 'text';
  status: 'scheduled' | 'ongoing' | 'completed' | 'cancelled';
  startTime: Date;
  endTime?: Date;
  duration?: number; // 持续时间（分钟）
  notes?: string; // 会诊记录
  prescription?: string; // 处方信息
  diagnosis?: string; // 诊断结果
  recommendations?: string[]; // 建议列表
  attachments?: string[]; // 附件URL列表
}

// 随访任务模型
export interface FollowUpTask {
  id: string;
  doctorId: string;
  patientId: string;
  title: string;
  description: string;
  scheduledDate: Date;
  completedDate?: Date;
  status: 'pending' | 'completed' | 'missed';
  priority: 'low' | 'medium' | 'high';
  type: 'phone' | 'online' | 'in_person';
  notes?: string;
  reminderSent: boolean;
}

// 患者风险分层模型
export interface PatientRiskStratification {
  patientId: string;
  overallRisk: 'low' | 'moderate' | 'high' | 'critical';
  riskFactors: RiskFactor[];
  assessmentDate: Date;
  nextAssessmentDate: Date;
  interventionPlan?: InterventionPlan;
}

// 风险因素模型
export interface RiskFactor {
  name: string;
  value: number | string;
  threshold: number | string;
  status: 'normal' | 'abnormal';
}

// 干预计划模型
export interface InterventionPlan {
  id: string;
  patientId: string;
  doctorId: string;
  createdAt: Date;
  updatedAt: Date;
  goals: InterventionGoal[];
  actions: InterventionAction[];
  reviewFrequency: number; // 复查频率（天数）
}

// 干预目标模型
export interface InterventionGoal {
  id: string;
  description: string;
  targetValue: string | number;
  currentValue: string | number;
  deadline: Date;
  status: 'not_started' | 'in_progress' | 'achieved' | 'missed';
}

// 干预行动模型
export interface InterventionAction {
  id: string;
  type: 'medication' | 'lifestyle' | 'diet' | 'exercise' | 'monitoring';
  description: string;
  frequency: string;
  duration?: number; // 持续时间（天）
  status: 'pending' | 'completed' | 'in_progress';
}